//fazendo...
#include <cstdio>

int v[2], p[2];
int w[2][2] m[2][2];

void read(){
	scanf("%d %d", &v[0], &v[1]);
	scanf("%d %d", &v[0], &v[1]);
	scanf("%d %d %d %d", &w[0][0], &w[0][1], &w[1][0], &w[1][1]);
	scanf("%d %d %d %d", &m[0][0], &m[0][1], &m[1][0], &m[1][1]);
}
void process(){
	
}
int main(){
	//freopen("in.txt", "r", stdin);
	//freopen("out.txt", "w", stdout);
	read();
	if(process())printf("-1");
	return 0;
}


